<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <button id="btn">button</button>
    <script>

        // 标准事件（处理函数）绑定
        const btn = document.getElementById('btn');

        //事件队列
        // const events = [
        //     { nanem: 'click', handler: function () { console.log(1); } },
        //     { nanem: 'click', handler: function () { console.log(2); } },
        // ]
        // arr.push
        btn.addEventListener('click', function () {
            console.log(1);
        })
        // arr.push
        btn.addEventListener('click', function () {
            console.log(2);
        })


    </script>
</body>

</html>